<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, user-scalable=no">
  <meta name="description" content="API docs for the SwaggerUI class from the shelf_swagger_ui library, for the Dart programming language.">
  <title>SwaggerUI class - shelf_swagger_ui library - Dart API</title>


  
  <link rel="preconnect" href="https://fonts.gstatic.com">
  <link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
  
  <link rel="stylesheet" href="../static-assets/github.css?v1">
  <link rel="stylesheet" href="../static-assets/styles.css?v1">
  <link rel="icon" href="../static-assets/favicon.png?v1">

  
</head>


<body data-base-href="../"
      data-using-base-href="false">

<div id="overlay-under-drawer"></div>

<header id="title">
  <button id="sidenav-left-toggle" type="button">&nbsp;</button>
  <ol class="breadcrumbs gt-separated dark hidden-xs">
    <li><a href="../index.html">shelf_swagger_ui</a></li>
    <li><a href="../shelf_swagger_ui/shelf_swagger_ui-library.html">shelf_swagger_ui</a></li>
    <li class="self-crumb">SwaggerUI class</li>
  </ol>
  <div class="self-name">SwaggerUI</div>
  <form class="search navbar-right" role="search">
    <input type="text" id="search-box" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
  </form>
</header>

<main>


  <div id="dartdoc-main-content" class="main-content">
      <div>
<h1><span class="kind-class">SwaggerUI</span> class 
    <a href="https://dart.dev/null-safety" class="feature feature-null-safety" title="Supports the null safety language feature.">Null safety</a>
 
</h1></div>

    
<section class="desc markdown">
  <p>This class starts all the default attributes to start swagger-ui.
In addition to receiving the Spec (YAML/JSON)
it is also possible to configure the title and enable "deepLink".
<br><br>
<a href="../shelf_swagger_ui/SwaggerUI/fileSchemaPath.html">fileSchemaPath</a>: Schema path (YAML/JSON). <br>
<a href="../shelf_swagger_ui/SwaggerUI/title.html">title</a>: Defines the title that is visible in the browser tab. <br>
<a href="../shelf_swagger_ui/SwaggerUI/docExpansion.html">docExpansion</a>: (Default DocExpansion.list), Controls the default expansion setting for the operations and tags. It can be 'list' (expands only the tags), 'full' (expands the tags and operations) or 'none' (expands nothing). <br>
<a href="../shelf_swagger_ui/SwaggerUI/deepLink.html">deepLink</a>: (Default true) enables the use of deep-links to reference each node in the url (ex: /swagger/#/post). <br>
<a href="../shelf_swagger_ui/SwaggerUI/syntaxHighlightTheme.html">syntaxHighlightTheme</a>: (Default SyntaxHighlightTheme.agate) Highlight.js syntax coloring theme to use. (Only these 6 styles are available). <br>
<a href="../shelf_swagger_ui/SwaggerUI/persistAuthorization.html">persistAuthorization</a>: (Default false) If set to true, it persists authorization data and it would not be lost on browser close/refresh. <br>
<br><br>
Example:</p>
<pre class="language-dart"><code class="language-dart">final swaggerHandler = SwaggerUI(
 'swagger/swagger.yaml',
 title: 'Ship API',
 deepLink: true,
);

var server = await io.serve(swaggerHandler, '0.0.0.0', 4000);
</code></pre>
</section>



    
  <section class="summary offset-anchor" id="constructors">
    <h2>Constructors</h2>

    <dl class="constructor-summary-list">
        <dt id="SwaggerUI" class="callable">
          <span class="name"><a href="../shelf_swagger_ui/SwaggerUI/SwaggerUI.html">SwaggerUI</a></span><span class="signature">(<span class="parameter" id="-param-fileSchemaPath"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a></span> <span class="parameter-name">fileSchemaPath</span>, </span><span class="parameter" id="-param-title">{<span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a></span> <span class="parameter-name">title</span> = <span class="default-value">&#39;Shelf Swagger&#39;</span>, </span><span class="parameter" id="-param-docExpansion"><span class="type-annotation"><a href="../shelf_swagger_ui/DocExpansion.html">DocExpansion</a></span> <span class="parameter-name">docExpansion</span> = <span class="default-value">DocExpansion.list</span>, </span><span class="parameter" id="-param-syntaxHighlightTheme"><span class="type-annotation"><a href="../shelf_swagger_ui/SyntaxHighlightTheme.html">SyntaxHighlightTheme</a></span> <span class="parameter-name">syntaxHighlightTheme</span> = <span class="default-value">SyntaxHighlightTheme.agate</span>, </span><span class="parameter" id="-param-deepLink"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/bool-class.html">bool</a></span> <span class="parameter-name">deepLink</span> = <span class="default-value">false</span>, </span><span class="parameter" id="-param-persistAuthorization"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/bool-class.html">bool</a></span> <span class="parameter-name">persistAuthorization</span> = <span class="default-value">false</span>}</span>)</span>
        </dt>
        <dd>
          
        </dd>
    </dl>
  </section>

    <section class="summary offset-anchor" id="instance-properties">
      <h2>Properties</h2>

      <dl class="properties">
        <dt id="deepLink" class="property">
  <span class="name"><a href="../shelf_swagger_ui/SwaggerUI/deepLink.html">deepLink</a></span>
  <span class="signature">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/bool-class.html">bool</a></span> 

</dt>
<dd>
  (Default false) enables the use of deep-links to reference each node in the url (ex: /swagger/#/post).
  <div class="features">final</div>

</dd>

        <dt id="docExpansion" class="property">
  <span class="name"><a href="../shelf_swagger_ui/SwaggerUI/docExpansion.html">docExpansion</a></span>
  <span class="signature">&#8594; <a href="../shelf_swagger_ui/DocExpansion.html">DocExpansion</a></span> 

</dt>
<dd>
  Controls the default expansion setting for the operations and tags.
  <div class="features">final</div>

</dd>

        <dt id="fileSchemaPath" class="property">
  <span class="name"><a href="../shelf_swagger_ui/SwaggerUI/fileSchemaPath.html">fileSchemaPath</a></span>
  <span class="signature">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a></span> 

</dt>
<dd>
  Schema path (YAML/JSON).
  <div class="features">final</div>

</dd>

        <dt id="hashCode" class="property inherited">
  <span class="name"><a href="https://api.flutter.dev/flutter/dart-core/Object/hashCode.html">hashCode</a></span>
  <span class="signature">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/int-class.html">int</a></span> 

</dt>
<dd class="inherited">
  The hash code for this object.
  <div class="features">read-only, inherited</div>

</dd>

        <dt id="persistAuthorization" class="property">
  <span class="name"><a href="../shelf_swagger_ui/SwaggerUI/persistAuthorization.html">persistAuthorization</a></span>
  <span class="signature">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/bool-class.html">bool</a></span> 

</dt>
<dd>
  If set to true, it persists authorization data and it would not be lost on browser close/refresh
  <div class="features">final</div>

</dd>

        <dt id="runtimeType" class="property inherited">
  <span class="name"><a href="https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html">runtimeType</a></span>
  <span class="signature">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/Type-class.html">Type</a></span> 

</dt>
<dd class="inherited">
  A representation of the runtime type of the object.
  <div class="features">read-only, inherited</div>

</dd>

        <dt id="syntaxHighlightTheme" class="property">
  <span class="name"><a href="../shelf_swagger_ui/SwaggerUI/syntaxHighlightTheme.html">syntaxHighlightTheme</a></span>
  <span class="signature">&#8594; <a href="../shelf_swagger_ui/SyntaxHighlightTheme.html">SyntaxHighlightTheme</a></span> 

</dt>
<dd>
  Highlight.js syntax coloring theme to use. (Only these 6 styles are available).
  <div class="features">final</div>

</dd>

        <dt id="title" class="property">
  <span class="name"><a href="../shelf_swagger_ui/SwaggerUI/title.html">title</a></span>
  <span class="signature">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a></span> 

</dt>
<dd>
  Defines the title that is visible in the browser tab.
  <div class="features">final</div>

</dd>

      </dl>
    </section>

    
  <section
      class="summary offset-anchor"
      id="instance-methods">
    <h2>Methods</h2>
    <dl class="callables">
        <dt id="call" class="callable">
  <span class="name"><a href="../shelf_swagger_ui/SwaggerUI/call.html">call</a></span><span class="signature">(<wbr><span class="parameter" id="call-param-request"><span class="type-annotation"><a href="https://pub.dev/documentation/shelf/1.3.1/shelf/Request-class.html">Request</a></span> <span class="parameter-name">request</span></span>)
    <span class="returntype parameter">&#8594; <a href="https://api.flutter.dev/flutter/dart-async/FutureOr-class.html">FutureOr</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="https://pub.dev/documentation/shelf/1.3.1/shelf/Response-class.html">Response</a></span>&gt;</span></span>
  </span>
  

</dt>
<dd>
  Shelf Handler
  

</dd>

        <dt id="noSuchMethod" class="callable inherited">
  <span class="name"><a href="https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html">noSuchMethod</a></span><span class="signature">(<wbr><span class="parameter" id="noSuchMethod-param-invocation"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/Invocation-class.html">Invocation</a></span> <span class="parameter-name">invocation</span></span>)
    <span class="returntype parameter">&#8594; dynamic</span>
  </span>
  

</dt>
<dd class="inherited">
  Invoked when a non-existent method or property is accessed.
  <div class="features">inherited</div>

</dd>

        <dt id="toString" class="callable inherited">
  <span class="name"><a href="https://api.flutter.dev/flutter/dart-core/Object/toString.html">toString</a></span><span class="signature">(<wbr>)
    <span class="returntype parameter">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/String-class.html">String</a></span>
  </span>
  

</dt>
<dd class="inherited">
  A string representation of this object.
  <div class="features">inherited</div>

</dd>

    </dl>
  </section>
    
  <section
      class="summary offset-anchor inherited"
      id="operators">
    <h2>Operators</h2>
    <dl class="callables">
        <dt id="operator ==" class="callable inherited">
  <span class="name"><a href="https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html">operator ==</a></span><span class="signature">(<wbr><span class="parameter" id="==-param-other"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/Object-class.html">Object</a></span> <span class="parameter-name">other</span></span>)
    <span class="returntype parameter">&#8594; <a href="https://api.flutter.dev/flutter/dart-core/bool-class.html">bool</a></span>
  </span>
  

</dt>
<dd class="inherited">
  The equality operator.
  <div class="features">inherited</div>

</dd>

    </dl>
  </section>
    
    
    


  </div> <!-- /.main-content -->

  <div id="dartdoc-sidebar-left" class="sidebar sidebar-offcanvas-left">
    <header id="header-search-sidebar" class="hidden-l">
  <form class="search-sidebar" role="search">
    <input type="text" id="search-sidebar" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
  </form>
</header>

<ol class="breadcrumbs gt-separated dark hidden-l" id="sidebar-nav">
  <li><a href="../index.html">shelf_swagger_ui</a></li>
  <li><a href="../shelf_swagger_ui/shelf_swagger_ui-library.html">shelf_swagger_ui</a></li>
  <li class="self-crumb">SwaggerUI class</li>
</ol>


    <h5>shelf_swagger_ui library</h5>
    <ol>
  <li class="section-title"><a href="../shelf_swagger_ui/shelf_swagger_ui-library.html#classes">Classes</a></li>
  <li><a href="../shelf_swagger_ui/SwaggerUI-class.html">SwaggerUI</a></li>






  <li class="section-title"><a href="../shelf_swagger_ui/shelf_swagger_ui-library.html#enums">Enums</a></li>
  <li><a href="../shelf_swagger_ui/DocExpansion.html">DocExpansion</a></li>
  <li><a href="../shelf_swagger_ui/SyntaxHighlightTheme.html">SyntaxHighlightTheme</a></li>


</ol>

  </div>

  <div id="dartdoc-sidebar-right" class="sidebar sidebar-offcanvas-right">
    <ol>

        <li class="section-title"><a href="../shelf_swagger_ui/SwaggerUI-class.html#constructors">Constructors</a></li>
          <li><a href="../shelf_swagger_ui/SwaggerUI/SwaggerUI.html">SwaggerUI</a></li>


    <li class="section-title">
      <a href="../shelf_swagger_ui/SwaggerUI-class.html#instance-properties">Properties</a>
    </li>
    <li><a href="../shelf_swagger_ui/SwaggerUI/deepLink.html">deepLink</a></li>
    <li><a href="../shelf_swagger_ui/SwaggerUI/docExpansion.html">docExpansion</a></li>
    <li><a href="../shelf_swagger_ui/SwaggerUI/fileSchemaPath.html">fileSchemaPath</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/hashCode.html">hashCode</a></li>
    <li><a href="../shelf_swagger_ui/SwaggerUI/persistAuthorization.html">persistAuthorization</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html">runtimeType</a></li>
    <li><a href="../shelf_swagger_ui/SwaggerUI/syntaxHighlightTheme.html">syntaxHighlightTheme</a></li>
    <li><a href="../shelf_swagger_ui/SwaggerUI/title.html">title</a></li>

    <li class="section-title"><a href="../shelf_swagger_ui/SwaggerUI-class.html#instance-methods">Methods</a></li>
    <li><a href="../shelf_swagger_ui/SwaggerUI/call.html">call</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html">noSuchMethod</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/toString.html">toString</a></li>

    <li class="section-title inherited"><a href="../shelf_swagger_ui/SwaggerUI-class.html#operators">Operators</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html">operator ==</a></li>




</ol>

  </div><!--/.sidebar-offcanvas-->

</main>

<footer>
  <span class="no-break">
    shelf_swagger_ui
      0.1.2
  </span>

  
</footer>



<script src="../static-assets/highlight.pack.js?v1"></script>
<script src="../static-assets/script.js?v1"></script>



</body>

</html>

